package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.custom.AjaxResult;
import com.example.demo.custom.BaseController;
import com.example.demo.entity.XiMei;
import com.example.demo.form.XiMeiForm;
import com.example.demo.service.XiMeiService;

@RestController
@RequestMapping(value = "/ximei")
public class XiMeiController extends BaseController<XiMei, Integer, XiMeiForm> {

	@Autowired
	private XiMeiService ximeiDao;
	@RequestMapping(value="/findbyId")
	public Object byId(XiMeiForm form) {
		XiMei model = null;
		Integer id = form.getId();
		if(id!=null) {
			 model = ximeiDao.findById(id);
		}	
		return new AjaxResult(model);
		
}
}
